from langchain_core.prompts import MessagesPlaceholder, ChatPromptTemplate

ChatPromptTemplate.from_messages([
    ("system", "You are a helpful assistant."),
    MessagesPlaceholder(variable_name="chat_history"),  # 占位符
    ("human", "{input}")
])